﻿using System;

using log4net;

/// <summary>
/// 日志操作类
/// </summary>
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
namespace DQS.Core.Log
{    
    public class Log
    {
        private Log() { }
        //public static readonly ILog _log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        /// <summary>
        /// 创建日志实例
        /// </summary>
        /// <param name="argObj">this</param>
        /// <returns>ILog</returns>
        public static ILog Instance(object argObj)
        {
            return log4net.LogManager.GetLogger(argObj == null ? System.Reflection.MethodBase.GetCurrentMethod().DeclaringType : argObj.GetType());
        }
    }
}
